home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2007 December / PCWKCD1207B.iso / Blogowanie poza sfera / Flock 0.9.1.3 stable / flock-0.9.1.3.en-US.win32.exe / flock / res / detect / flickr.xml < prev    next >
Extensible Markup Language  |  2007-10-12  |  7KB  |  215 lines

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <service name="flickr"
  3.          version="$Id: flickr.xml 14068 2007-08-09 18:57:56Z chris $"
  4.          xmlns="http://www.flock.com/web-detective#">
  5.  
  6.   <strings>
  7.     <string name="domains" value="flickr.com,yahoo.com"/>
  8.     <string name="userlogin">
  9.       <![CDATA[http://flickr.com/signin/]]>
  10.     </string>
  11.     <string name="privatemessage">
  12.       <![CDATA[http://www.flickr.com/messages_write.gne]]>
  13.     </string>
  14.     <string name="userprofile">
  15.       <![CDATA[http://www.flickr.com/people/%accountid%/]]>
  16.     </string>
  17.     <string name="editprofile">
  18.       <![CDATA[http://www.flickr.com/profile_edit.gne]]>
  19.     </string>
  20.     <string name="relationship">
  21.       <![CDATA[http://www.flickr.com/relationship.gne?id=%accountid%]]>
  22.     </string>
  23.     <string name="userphotos">
  24.       <![CDATA[http://www.flickr.com/photos/%accountid%/]]>
  25.     </string>
  26.     <string name="photopage">
  27.       <![CDATA[http://www.flickr.com/photos/%accountid%/%photoid%/]]>
  28.     </string>
  29.     <string name="commentsreceivedRSS">
  30.       <![CDATA[http://api.flickr.com/services/feeds/activity.gne?id=%accountid%&format=rss_200]]>
  31.     </string>
  32.     <string name="commentrepliesRSS">
  33.       <![CDATA[http://api.flickr.com/services/feeds/photos_comments.gne?user_id=%accountid%&format=rss_200]]>
  34.     </string>
  35.     <string name="staticimage">
  36.       <![CDATA[http://static.flickr.com/%server%/%photoid%_%secret%%size%.jpg]]>
  37.     </string>
  38.   </strings>
  39.  
  40.   <sessioncookies>
  41.     <cookie host=".flickr.com" name="cookie_accid" path="/"/>
  42.     <cookie host=".flickr.com" name="cookie_epass" path="/"/>
  43.     <cookie host=".flickr.com" name="cookie_session" path="/"/>
  44.     <cookie host=".flickr.com" name="use_master_until" path="/"/>
  45.   </sessioncookies>
  46.  
  47.   <detect type="login"><!-- Yahoo! login with username text field -->
  48.     <url><host equals="login.yahoo.com"/></url>
  49.     <form>
  50.       <xpath name="username" extract="value">
  51.         <![CDATA[[@name="login_form"]//input[@id="username"][@type="text"]]]>
  52.       </xpath>
  53.       <xpath name="password" extract="value">
  54.         <![CDATA[//input[@id="passwd"]]]>
  55.       </xpath>
  56.     </form>
  57.   </detect>
  58.  
  59.   <detect type="login"><!-- Yahoo! login with hidden username field -->
  60.     <url><host equals="login.yahoo.com"/></url>
  61.     <form>
  62.       <xpath name="username" extract="value">
  63.         <![CDATA[[@name="login_form"]//input[@name=".slogin"][@type="hidden"]]]>
  64.       </xpath>
  65.       <xpath name="password" extract="value">
  66.         <![CDATA[//input[@id="passwd"]]]>
  67.       </xpath>
  68.     </form>
  69.   </detect>
  70.  
  71.   <detect type="login"><!-- Old Skool Flickr login -->
  72.     <url domain="flickr.com"><path contains="signin/"/></url>
  73.     <form>
  74.       <xpath name="username" extract="value">
  75.         <![CDATA[[@name="flickrloginform"]//input[@id="first_field"]]]>
  76.       </xpath>
  77.       <xpath name="password" extract="value">
  78.         <![CDATA[//input[@name="password"]]]>
  79.       </xpath>
  80.     </form>
  81.   </detect>
  82.  
  83.   <detect type="signup">
  84.     <url><host equals="edit.yahoo.com"/><path contains="/config/eval_register"/></url>
  85.     <form>
  86.       <field tagname="input" name="login" extractas="username"/>
  87.       <field tagname="input" name=".pw" type="password" extractas="password"/>
  88.     </form>
  89.   </detect>
  90.  
  91.   <detect type="loggedin">
  92.     <url domain="flickr.com"/>
  93.     <xpath><![CDATA[//div[@id="TopBar"]//td[@class="Status"]//a[@href="/account"]]]></xpath>
  94.   </detect>
  95.  
  96.   <detect type="loggedin">
  97.     <url domain="flickr.com"><path contains="/welcome/hello"/></url>
  98.     <regexp><![CDATA[/<h1>OK. You're all set, /]]></regexp>
  99.   </detect>
  100.  
  101.   <detect type="loggedout">
  102.     <url domain="flickr.com"/>
  103.     <xpath><![CDATA[//div[@id="TopBar"]//td[@class="Status"]//a[@href="/signin/"]]]></xpath>
  104.   </detect>
  105.  
  106.   <detect type="loggedout">
  107.     <cookie nomatch="true" host=".flickr.com" name="cookie_session"/>
  108.     <cookie nomatch="true" host=".flickr.com" name="cookie_epass"/>
  109.   </detect>
  110.  
  111.   <detect type="accountinfo">
  112.     <results>
  113.       <regexp re1="accountid">
  114.         <![CDATA[/global_nsid = '(.+)'/]]>
  115.       </regexp>
  116.       <regexp re1="username">
  117.         <![CDATA[/global_name ='(.+)'/]]>
  118.       </regexp>
  119.       <regexp re1="avatarURL">
  120.         <![CDATA[/global_icon_url ='(.+)'/]]>
  121.       </regexp>
  122.     </results>
  123.   </detect>
  124.  
  125.   <detect type="person">
  126.     <url domain="flickr.com">
  127.       <path contains="photos/" />
  128.     </url>
  129.     <regexp re1="userid">
  130.       <![CDATA[/send.photostream=(.*)"..img/]]>
  131.     </regexp>
  132.     <regexp re1="username">
  133.       <![CDATA[/var alias = '(.*)';/]]>
  134.     </regexp>
  135.   </detect>
  136.  
  137.   <detect type="person">
  138.     <url domain="flickr.com"><path contains="photos/"/></url>
  139.     <regexp re1="userid" re2="username">
  140.       <![CDATA[/photos_public\.gne\?id=([^&"]+)&.+Subscribe to (.+)'s? photos/]]>
  141.     </regexp>
  142.   </detect>
  143.  
  144.   <detect type="person">
  145.     <url domain="flickr.com"><path contains="photos/"/></url>
  146.     <regexp re1="userid" re2="username">
  147.       <![CDATA[/contextLink_stream(.+)">(.+)'s photostream/]]>
  148.     </regexp>
  149.   </detect>
  150.  
  151.   <detect type="person">
  152.     <url domain="flickr.com"><path contains="people/"/></url>
  153.     <regexp re1="userid">
  154.       <![CDATA[/messages_write\.gne\?to=(.+?)"/]]>
  155.     </regexp>
  156.     <regexp re1="username">
  157.       <![CDATA[/<span class="nickname">(.+)</]]>
  158.     </regexp>
  159.   </detect>
  160.  
  161.   <detect type="pool">
  162.     <url domain="flickr.com"><path contains="groups/"/></url>
  163.     <conditions>
  164.       <regexp><![CDATA[/Subscribe to .+ discussion threads/]]></regexp>
  165.     </conditions>
  166.     <results>
  167.       <regexp re1="groupname">
  168.         <![CDATA[/Subscribe to (.+) discussion threads/]]>
  169.       </regexp>
  170.       <regexp re1="groupid">
  171.         <![CDATA[/\/groups_members\.gne\?id=([^"&]+)/]]>
  172.       </regexp>
  173.     </results>
  174.   </detect>
  175.  
  176.   <detect type="pool">
  177.     <url domain="flickr.com"/>
  178.     <regexp re1="groupname">
  179.       <![CDATA[/<a href="\/groups\/[^\/]+\/">([^<]+)</]]>
  180.     </regexp>
  181.     <regexp re1="groupid">
  182.       <![CDATA[/\/groups_members[^\.]*\.gne\?id=([^"&]+)/]]>
  183.     </regexp>
  184.   </detect>
  185.  
  186.   <detect type="pool">
  187.     <regexp re1="groupid" re2="groupname">
  188.       <![CDATA[/id="contextLink_pool([^"]+)">(.+) \(Pool\)<\/a>/]]>
  189.     </regexp>
  190.   </detect>
  191.  
  192.   <detect type="apiAuth1">
  193.     <conditions>
  194.       <regexp><![CDATA[/value="OK, I'LL ALLOW IT"/]]></regexp>
  195.     </conditions>
  196.     <results>
  197.       <regexp re1="magic_cookie">
  198.         <![CDATA[/name="magic_cookie" value="(\w+)"/]]>
  199.       </regexp>
  200.       <regexp re1="api_sig">
  201.         <![CDATA[/name="api_sig" value="(\w+)"/]]>
  202.       </regexp>
  203.     </results>
  204.   </detect>
  205.  
  206.   <detect type="apiAuth2">
  207.     <regexp><![CDATA[/<p class="Confirm">Success!<\/p>/]]></regexp>
  208.   </detect>
  209.  
  210.   <detect type="apiAuth3">
  211.     <regexp><![CDATA[/<a href="\/account" /]]></regexp>
  212.   </detect>
  213.  
  214. </service>
  215.